﻿using ExpenseSystem.Common;
using ExpenseSystem.Core.DataAddOn;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Model;
using System.Web;

namespace ExpenseSystem.Core.CustomerModules
{
    public abstract class CustomerManager : INormalManager<CustomerModel>
    {

        protected string tran = HttpContext.Current.Items[Definition.SESSION_TRAN_STR].ToString();

        protected CustomerManager()
        {
            profile = Authority.Authority.GetUserProfile();
        }

        protected UserProfile profile;
        public static CustomerManager CreateInstance()
        {
            return new CustomerBaseManager();
        }
        protected NormalDataUpdater<CustomerModel> CustomerUpdater = new CustomerUpdaterRegister().GetCustomerUpdater();

        public abstract bool Delete( CustomerModel Customer,  out string message);
        public abstract bool DeleteById(long[] CustomerId,  out string message);
        public abstract bool Save(CustomerModel Customer,  out string message ,params IAddable<CustomerModel>[] addables);
    }
}
